package testIntergration;

import static org.junit.Assert.*;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import FamilyTherapy.MagicToolCard;
import FamilyTherapy.EventCard;
import FamilyTherapy.Player;

public class testMagicToolCard_noDeductionAsRebound {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testNoDeductionAsRebound() {
		Player[] p ={new Player("a",1),new Player("b",2)};
		
		final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
		System.setOut(new PrintStream(outContent));
		
	
		
		EventCard e = new EventCard(1);	
		MagicToolCard m = new MagicToolCard();	
		int result = m.noDeductionAsRebound(e,1,1,p);
		
		String expected = "Now, you use this card to be rebound the deduction to decision maker.\n";
		
		assertEquals(expected,outContent.toString());
		assertEquals(p[1].getPoint(), 7);
		assertEquals(result, -1);
		
	}

}
